﻿@model Commission.Models.TransactionHistory
@using MyResources = Commission.Resources.AppResource

@{
    ViewBag.Title = "Create";
}

<h2>@MyResources.LinkWithdraw</h2>

@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <p>
            @Html.Label(@MyResources.LabelAmount80)
            @Html.Raw(" : ")
            &nbsp;&nbsp;
            @Html.LabelFor(model => model.ProductAmount, 
                (string)@ViewBag.TotalAmount, new { @class = "LabelAmount" })
        </p>

        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        
        <div class="form-group">
            <label class="control-label col-md-2" for="Amount">
                @MyResources.LabelAmount
            </label>
            
            <div class="col-md-10">
                @Html.EditorFor(model => model.Amount,
                    new { htmlAttributes = new { @class = "form-control text-right" } })
                @Html.ValidationMessageFor(model => model.Amount, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-2" for="Description">
                @MyResources.LabelDescription
            </label>

            <div class="col-md-10">
                @Html.EditorFor(model => model.Description, 
                    new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value=@MyResources.LinkWithdraw class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink(@MyResources.LinkBackToList, "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
